#!/bin/sh

radio="radio1"
disabled=$(uci get wireless.$radio.disabled)
mode=$(uci get wireless.default_$radio.mode)

if [ x$mode = x"sta" ] && [ x$disabled = x"0" ]; then
	case "$ACTION" in
		"add")
			WLAN_IFACE=$(ls /sys/$DEVPATH/net) || exit 0
			wifi reload $radio
			;;
	esac
fi
